package com.homework3;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class Test01 {
    public static void main(String[] args) {

        HashMap<String, String> map1 = new HashMap<>();
        HashMap<String, String> map2 = new HashMap<>();
        HashMap<String,HashMap<String, String>> map3 = new HashMap<>();
        map1.put("001","李晨");
        map1.put("002","范冰冰");
        map2.put("001","码云");
        map2.put("002","马化腾");
        map3.put("java基础班",map1);
        map3.put("java就业班",map2);
        Set<String> strings = map3.keySet();
        for (String string : strings) {
            System.out.println(string+"->"+map3.get(string));
        }
        Set<Map.Entry<String, HashMap<String, String>>> entries = map3.entrySet();
        Iterator<Map.Entry<String, HashMap<String, String>>> iterator = entries.iterator();
        while (iterator.hasNext()){
            Map.Entry<String, HashMap<String, String>> next = iterator.next();
            System.out.println(next.getKey()+"-->"+next.getValue());
        }

    }
}
